﻿using System.ComponentModel;
using System.Diagnostics.Contracts;
using Library.Collections.Specialized;
using INDEX = System.UInt64;

namespace Library.Collections.Generic
{
    [ImmutableObject(true)]
    public interface IVectorReadOnly<TElement> : IMapReadOnly<INDEX, TElement>, IContainer<TElement>, ICountable, IEnumerableDirection<TElement>
    {
        [Pure]
        bool Contains(TElement item, out INDEX index);
    }

    [ImmutableObject(true)]
    public interface IVectorMultidimensionalReadOnly<TElement> : IMapReadOnly<INDEX[], TElement>, IContainer<TElement>, ICountable
    {
        [Pure]
        INDEX[] Extent { get; }

        [Pure]
        bool Contains(TElement item, out INDEX[] index);

        [Pure]
        INDEX Dimensions { get; }

        [Pure]
        INDEX GetLowerBound(INDEX dimension);

        [Pure]
        INDEX GetUpperBound(INDEX dimension);
    }
}
